package com.leilei.serviceProject.domain.strategy.model.entity;

import lombok.*;

/**
 * @author yanglei
 * @description
 * @create 2024/10/25 15:18
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RaffleRuleFilterResultEntity<T extends RaffleRuleFilterResultEntity.FilterResultEntity> {
    private String ruleModel;
    private T data;
    private String code;
    private String info;

    /*D:\笔记\项目\业务项目\虫洞-大营销\big-market\big-market-domain\src\main\java\com\leilei\serviceProject\domain\strategy\model\entity\RaffleRuleFilterResultEntity.java:21:5
    java: com.leilei.serviceProject.domain.strategy.model.entity.RaffleRuleFilterResultEntity.BeforeFilterResultEntity中的builder()无法覆盖com.leilei.serviceProject.domain.strategy.model.entity.RaffleRuleFilterResultEntity中的<T>builder()
    返回类型com.leilei.serviceProject.domain.strategy.model.entity.RaffleRuleFilterResultEntity.BeforeFilterResultEntity.BeforeFilterResultEntityBuilder与com.leilei.serviceProject.domain.strategy.model.entity.RaffleRuleFilterResultEntity.RaffleRuleFilterResultEntityBuilder<T>不兼容*/
    // BeforeFilterResultEntity中的builder()无法覆盖RaffleRuleFilterResultEntity中的<T>builder()
    // 返回类型BeforeFilterResultEntity.BeforeFilterResultEntityBuilder与RaffleRuleFilterResultEntity.RaffleRuleFilterResultEntityBuilder<T>不兼容
    // 为了解决这个报错，引入了中间类FilterResultEntity，至于为啥会报错还没搞清楚
    static public class FilterResultEntity{

    }
    @EqualsAndHashCode(callSuper = true)
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    static public class BeforeFilterResultEntity extends RaffleRuleFilterResultEntity.FilterResultEntity {
        /**
         * 抽奖策略ID
         */
        private Long strategyId;
        /**
         * 奖品ID
         */
        private Integer awardId;

        /**
         * 权重值Key；用于抽奖时可以选择权重抽奖
         */
        private String ruleWeightKey;
    }
    @EqualsAndHashCode(callSuper = true)
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    static public class CenterFilterResultEntity extends RaffleRuleFilterResultEntity.FilterResultEntity {
        /**
         * 奖品ID
         */
        private Integer awardId;
    }

}
